﻿<%@ Page Language="VB" AutoEventWireup="false" CodeFile="ManageHomePageBanners.aspx.vb" Inherits="Arwani.Backend_ManageHomePageBanners" %>

<%@ Register src="Menu.ascx" tagname="Menu" tagprefix="uc1" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title> Arwani Backend Panel</title>
    <script src="../js/jquery.min.js" type="text/javascript"></script>
    <script language="javascript" type="text/javascript">
        function postSortOrder(sortOrder, tableName, whereID, valueID) {
            $('#div_result').html('<input  type="image" src="../images/loading.gif" />');
            $.post("UpdateSortOrder.aspx", { sortOrder: sortOrder, tableName: tableName, whereID: whereID, valueID: valueID }, function (data) {
                $('#div_result').html(data);
            });
        }
    
    </script>
    <link href="../css/admin/style.css" rel="stylesheet" type="text/css" />
    <style>
    
    .table thead > tr > th, .table tbody > tr > th, .table tfoot > tr > th, .table thead > tr > td, .table tbody > tr > td, .table tfoot > tr > td {
    border-top: 1px solid #DDDDDD;
    line-height: 1.42857;
    padding: 8px;
    vertical-align: bottom !important;
}
    </style>

</head>
<body>
    <form id="form1" runat="server">
<div class="tablecontent">
        <table border="0" cellpadding="2" cellspacing="2" width="100%" align="center">
            <tr>
                <td align="center">
                    <uc1:Menu ID="Menu1" runat="server" />
                </td>
            </tr>
            <tr>
                <td align="center">
                    <table border="0" cellpadding="3" cellspacing="3">
                        <tr>
                            <td>
                                <table border="0" cellpadding="2" cellspacing="2">
                                    <tr>
                                        <td align="left">
                                            <asp:Label ID="lblImage" runat="server" Text="Banner Image"></asp:Label>
                                        </td>
                                        <td align="left">
                                            <input id="flProductImage" runat="server" type="file" />
                                        </td>
                                    </tr>
                                      <tr><td style="line-height:5px;">&nbsp;</td></tr>
                                    <tr>
                                        <td align="center" colspan="2">
                                            <asp:Button ID="btnSave" runat="server" Text="Save" />
                                            &nbsp;</td>
                                    </tr>
                                </table>
                            </td>
                        </tr>
                        <tr><td style="line-height:10px;"></td></tr>
                        <tr>
            <td align="center"><div id="div_result" style="color:Red"></div></td>
            </tr>
                        <tr>
                            <td valign="top">
                                <asp:DataList ID="dtImages" runat="server" RepeatColumns="4"   DataKeyField="id"  CssClass="table">
                                    <ItemTemplate>
                                        <table border="0" cellpadding="2" cellspacing="2">
                                            <tr>
                                                <td style="vertical-align: top !important;">
                                                    <asp:Image ID="imgProduct" ImageUrl='<%#getImage(DataBinder.Eval(Container.DataItem,"banner_image")) %>' Width="100" runat="server" />
                                                    <br /><br />
                                                    <asp:TextBox Width="45px" MaxLength="4" ID="txtSortOrder" runat="server" text='<%#DataBinder.Eval(Container.DataItem,"sortorder") %>' ></asp:TextBox>
                                                </td>
                                            </tr>
                                            <tr>
                                                <td>
                                                    <asp:LinkButton ID="lnkDelete" CommandArgument='<%#DataBinder.Eval(Container.DataItem,"banner_image") %>' runat="server" Text="Delete" CommandName="Delete"
                                                        ></asp:LinkButton>
                                                </td>
                                            </tr>
                                        </table>
                                    </ItemTemplate>
                                </asp:DataList>
                            </td>
                        </tr>
                    </table>
                </td>
            </tr>
        </table>
    </div>
    </form>
</body>
</html>
